package com.wrappers;

public class Pair<F, S> extends Returnable {
	private F	first;
	private S	second;

	/**
	 * Creates a pair that can hold two different types.
	 * 
	 * @param first
	 *            the first the object to be held by the pair
	 * @param second
	 *            the second object to be held by the pair
	 */
	public Pair(F first, S second)
	{
		this.first = first;
		this.second = second;
	}

	/**
	 * Returns the first element of this pair
	 * 
	 * @return the first element of this pair
	 */
	public F getFirst()
	{
		return first;
	}

	/**
	 * Returns the second element of this pair
	 * 
	 * @return the second element of this pair
	 */
	public S getSecond()
	{
		return second;
	}

	/**
	 * A string representation of this pair.
	 */
	public String toString()
	{
		return "F: " + first + " S: " + second;
	}

}
